package com.ahuiapp.ahuibang.util;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

/**用于检查网络是否通畅的工具类
 * @author Administrator
 *2011-12-22
 */
public class Util {
	
	public static boolean CheckNetwork(Context context){
		NetworkInfo info = null;
	 info = ((ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo();
	  if(info!=null && info.isConnected()) return true;
	  else return false;
	}
	
	
}
